package com.join.template.core.util;

import java.io.IOException;
import java.io.Writer;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Utils {

    public static String escape(String str) {
        return Entities.getInstance(Entities.EntitiesType.HTML40).escape(str);
    }

    public static void escape(Writer writer, String str) throws IOException {
        Entities.getInstance(Entities.EntitiesType.HTML40).escape(writer, str);
    }

    public static String unescape(String str) {
        return Entities.getInstance(Entities.EntitiesType.HTML40).unescape(str);
    }

    public static void unescape(Writer writer, String str) throws IOException {
        Entities.getInstance(Entities.EntitiesType.HTML40).unescape(writer, str);
    }

}
